package cn.dnui_cr503.dnuifood_16110100503.model;

import cn.dnui_cr503.dnuifood_16110100503.iface.Meiface;
import cn.dnui_cr503.dnuifood_16110100503.listener.OnRetrofitListener;
import cn.dnui_cr503.dnuifood_16110100503.service.MeService;
import retrofit2.Call;

/**
 * Created by chengrui on 2018/12/3.
 */

public class MeModel extends BaseModel implements Meiface{
    private MeService service;

    public MeModel(){
        super();
        service = retrofit.create(MeService.class);
    }
    @Override
    public void getUserById(String user_id, OnRetrofitListener listener) {
        Call call =service.getUserById(user_id);
        bindCallback(call,listener,1);
    }

    @Override
    public void updateUserById(String user_id, String username, String userpass, String mobilenum, String address, OnRetrofitListener listener) {
        Call call =service.updateUserById(user_id,username,userpass,mobilenum,address);
        bindCallback(call,listener,2);
    }
}
